class CartItem
  attr_accessor :product_id, :quantity, :price
  
  def initialize(product_id, quantity, price = 0)
    self.product_id = product_id
    self.quantity = quantity
    self.price = price
  end
  
  def ==(other_object)
    if self.product_id == other_object.product_id
      true
    else
      false
    end
  end
  
  def increase
    self.quantity += 1
  end
  
  def decrease
    self.quantity -= 1
  end
end
